<!-- 临床内容 -->
<template>
	<view class="therepair">
		<cu-custom bgColor="bg-gradual-inmode" :isBack="false"><block slot="content">临床内容</block></cu-custom>
		<view class="grid col-5 padding-sm">
			<button class="cu-btn round bg-green hujiao" @click="go()">
				<view class="iconleft">
					<text class="cuIcon-dianhua "></text>
					<text class="">扫一扫</text>
				</view>
			</button>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	methods: {
		go() {
			uni.scanCode({
				success: function(res) {
					uni.navigateTo({
						url:'/pages/webview/index?toUrl='+res.result
					})
				},
				fail: function(res) {
					// 取消操作后的回调 跳转到小程序首页
					uni.switchTab({
						url: '/pages/index/index'
					});
				}
			});
		},
	}
};
</script>

<style>
.therepair {
}
.hujiao {
	width: 100vh;
	margin-top: calc(50% + 70rpx);
}
.cuIcon-dianhua {
	margin-right: 20rpx;
}
</style>
